/**
 * Copyright (c) 2006-2007 Jinyi.lu
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of GNU LGPL license by gun.org
 * which accompanies this distribution, and is available at
 * http://gnu.feld-it.at/copyleft/lesser.html
 * 
 * Project Homepage : http://code.google.com/p/demou
 * Source Code: svn checkout http://demou.googlecode.com/svn/trunk/ demou
 * Mailing list : jinyi.lu@gmail.com
 *                stonelu@126.com
 *
 *  
 * Contributors:
 *     JinYi.Lu - initial API and implementation
 */
package cn.tworen.demou.rtmp;

import java.util.HashMap;
import java.util.Map;

import cn.tworen.demou.so.SharedObject;

/**
 * Created on  2007-2-13
 *
 * Title       : SharedObjectList.java
 * Description : 
 * 
 * @author     : LuJinYi
 * @version    : 1.0
 * @Date       : 2007-2-13
 * History     : 
 * 
 */
public class SharedObjectList {
	private Map<String, SharedObject> sharedObjectMap = new HashMap<String, SharedObject>();
	public SharedObject getSharedObject(String name) {
		return this.sharedObjectMap.get(name);
	}
	public boolean addSharedObject(SharedObject sharedObject) {
		if(this.sharedObjectMap.containsKey(sharedObject.getName())) {
			return false;
		}
		this.sharedObjectMap.put(sharedObject.getName(), sharedObject);
		return true;
	}
}
